package com.sailfish.template.infra.repository.pm.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.sailfish.template.infra.entity.Project;
import com.sailfish.template.infra.mapper.project.ProjectMapper;
import com.sailfish.template.infra.repository.pm.ProjectRepository;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

/**
 * @author XIAXINYU3
 * @date 2021/11/2
 */
@Slf4j
@Repository
public class ProjectRepositoryImpl extends ServiceImpl<ProjectMapper, Project> implements ProjectRepository {
    @Autowired
    ProjectMapper projectMapper;

    @Override
    public Project findOne(Long id) {
        return getById(id);
    }

    @Override
    public IPage<Project> page(Page page) {
        return projectMapper.page(page);
    }
}
